{% extends 'base.html' %}
{% load static %}
{% block title %}
	<title>天天生鲜-首页</title>
    <script type="text/javascript" src={% static "js/jquery-1.12.4.min.js" %}></script>
	<script type="text/javascript" src={% static "js/jquery-ui.min.js" %}></script>
	<script type="text/javascript" src={% static "js/slide.js" %}></script>
{% endblock title %}

{% block body %}
	<div class="search_bar clearfix">
		<a href="index.html" class="logo fl"><img src="{% static "images/logo.png" %}"></a>
		<div class="search_con fl">
            <form method='get' action="/search/" target="_blank">
			    <input type="text" class="input_text fl" name="q" placeholder="搜索商品">
			    <input type="submit" value="查询">
            </form>
		</div>
		<div class="guest_cart fr">
			<a href="#" class="cart_name fl">我的购物车</a>
			<div class="goods_count fl" id="show_count">1</div>
		</div>
	</div>

	<div class="navbar_con">
		<div class="navbar">
			<h1 class="fl">全部商品分类</h1>
			<ul class="navlist fl">
				<li><a href="">首页</a></li>
				<li class="interval">|</li>
				<li><a href="">手机生鲜</a></li>
				<li class="interval">|</li>
				<li><a href="">抽奖</a></li>
			</ul>
		</div>
	</div>

	<div class="center_con clearfix">
		<ul class="subnav fl">
			<li><a href="#model01" class="fruit">新鲜水果</a></li>
			<li><a href="#model02" class="seafood">海鲜水产</a></li>
			<li><a href="#model03" class="meet">猪牛羊肉</a></li>
			<li><a href="#model04" class="egg">禽类蛋品</a></li>
			<li><a href="#model05" class="vegetables">新鲜蔬菜</a></li>
			<li><a href="#model06" class="ice">速冻食品</a></li>
		</ul>
		<div class="slide fl">
			<ul class="slide_pics">
				<li><img src="{% static "images/slide.jpg" %}" alt="幻灯片"></li>
				<li><img src="{% static "images/slide02.jpg" %}" alt="幻灯片"></li>
				<li><img src="{% static "images/slide03.jpg" %}" alt="幻灯片"></li>
				<li><img src="{% static "images/slide04.jpg" %}" alt="幻灯片"></li>
			</ul>
			<div class="prev"></div>
			<div class="next"></div>
			<ul class="points"></ul>
		</div>
		<div class="adv fl">
			<a href="#"><img src="{% static "images/adv01.jpg" %}"></a>
			<a href="#"><img src="{% static "images/adv02.jpg" %}"></a>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model01">新鲜水果</h3>
			<div class="subtitle fl">
				<span>|</span>
                {% for foo in type11 %}
                    <a href="{{ foo.id }}">{{ foo.gname }}</a>
                {% endfor %}
{#				<a href="#">鲜芒</a>#}
{#				<a href="#">加州提子</a>#}
{#				<a href="#">亚马逊牛油果</a>#}
			</div>
			<a href="/goods/list/1/1/" class="goods_more fr" id="fruit_more">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="{% static "images/banner01.jpg" %}"></div>
			<ul class="goods_list fl">
                {% for foo in type1 %}
                <li>
					<h4><a href="#">{{ foo.gname }}</a></h4>
					<a href="/user/detail/{{ foo.id }}/"><img src="/static/media/{{ foo.gpic }}"></a>
					<div class="prize">¥{{ foo.gprise }}</div>
				</li>
                {% endfor %}

{#				<li>#}
{#					<h4><a href="#">草莓</a></h4>#}
{#					<a href="#"><img src="images/goods/goods003.jpg"></a>#}
{#					<div class="prize">¥ 30.00</div>#}
{#				</li>#}
{#				<li>#}
{#					<h4><a href="#">葡萄</a></h4>#}
{#					<a href="#"><img src="images/goods/goods002.jpg"></a>#}
{#					<div class="prize">¥ 5.50</div>#}
{#				</li>#}
{#				<li>#}
{#					<h4><a href="#">柠檬</a></h4>#}
{#					<a href="#"><img src="images/goods/goods001.jpg"></a>#}
{#					<div class="prize">¥ 3.90</div>#}
{#				</li>#}
{#				<li>#}
{#					<h4><a href="#">奇异果</a></h4>#}
{#					<a href="#"><img src="images/goods/goods012.jpg"></a>#}
{#					<div class="prize">¥ 25.80</div>#}
{#				</li>#}
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model02">海鲜水产</h3>
			<div class="subtitle fl">
				<span>|</span>
                {% for foo in type21 %}
                    <a href="{{ foo.id }}">{{ foo.gname }}</a>
                {% endfor %}
{#				<a href="#">河虾</a>#}
{#				<a href="#">扇贝</a>				#}
			</div>
			<a href="/goods/list/2/1/" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="{% static "images/banner02.jpg" %}"></div>
			<ul class="goods_list fl">
                {% for foo in type2 %}
                <li>
					<h4><a href="#">{{ foo.gname }}</a></h4>
					<a href="/user/detail/{{ foo.id }}/"><img src="/static/media/{{ foo.gpic }}"></a>
					<div class="prize">¥{{ foo.gprise }}</div>
				</li>
                {% endfor %}
{#				<li>#}
{#					<h4><a href="#">青岛野生海捕大青虾</a></h4>#}
{#					<a href="#"><img src="images/goods/goods018.jpg"></a>#}
{#					<div class="prize">¥ 48.00</div>#}
{#				</li>#}
{#				<li>#}
{#					<h4><a href="#">扇贝</a></h4>#}
{#					<a href="#"><img src="images/goods/goods019.jpg"></a>#}
{#					<div class="prize">¥ 46.00</div>#}
{#				</li>#}
{#				<li>#}
{#					<h4><a href="#">冷冻秋刀鱼</a></h4>#}
{#					<a href="#"><img src="images/goods/goods020.jpg"></a>#}
{#					<div class="prize">¥ 19.00</div>#}
{#				</li>#}
{#				<li>#}
{#					<h4><a href="#">基围虾</a></h4>#}
{#					<a href="#"><img src="images/goods/goods021.jpg"></a>#}
{#					<div class="prize">¥ 25.00</div>#}
{#				</li>#}
			</ul>
		</div>
	</div>

{% endblock body %}

{% block footer %}
{#    <script type="text/javascript" src="{% static "js/slideshow.js" %}"></script>#}
{#    <script type="text/javascript">#}
{#        BCSlideshow('focuspic');#}
{#        var oFruit = document.getElementById('fruit_more');#}
{#        var oShownum = document.getElementById('show_count');#}
{#        var hasorder = localStorage.getItem('order_finish');#}
{#        if(hasorder)#}
{#        {#}
{#            oShownum.innerHTML = '2';#}
{#        }#}
{#        oFruit.onclick = function(){#}
{#            window.location.href = 'list.html';#}
{#        }#}
{#    </script>#}
{% endblock footer %}